#!/bin/bash

# Test partial vdi read and write

. ./common

for i in `seq 0 5`; do
    _start_sheep $i
done

_wait_for_sheep 6

_cluster_format -c 6
_vdi_create test 4M

for i in `seq 0 7`; do
    echo $i | $DOG vdi write test $(($i * 1536 + 512)) 512
done

for i in `seq 0 7`; do
    $DOG vdi read test $(($i * 1536 + 512)) 512 | md5sum
done

$DOG vdi read test | md5sum
